package 设计模式.observer.util;

import java.util.Observable;
import java.util.Observer;

/**
 * @功能
 * @创建时间 2020/5/4
 */
public class ObserA implements Observer {
    private int myState;
    @Override
    public void update(Observable o, Object arg) {
        myState=((ConcreteSubject)o).getState();
    }

    public int getMyState() {
        return myState;
    }

    public void setMyState(int myState) {
        this.myState = myState;
    }
}
